package com.ss.android.crash.log;

import android.content.Context;
import android.text.TextUtils;

import com.ss.android.common.util.NetworkUtils;
import com.ss.android.http.legacy.a.NameValueImpl;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

public class j {
    private static volatile j c;
    public Context a;
    public volatile boolean b;
    private j(Context arg3) {

        if (arg3 == null) {
            throw new IllegalArgumentException("context must not be null");
        }

        this.a = arg3.getApplicationContext();
    }

    public static j a(Context arg2) {
        if (j.c == null) {
            Class v1 = j.class;
            synchronized (v1) {
                if (j.c == null) {
                    j.c = new j(arg2);
                }
            }
        }

        return j.c;
    }

    public static final class j$a {
        public j$a() {

        }

        public static Map a() {
            HashMap v1 = new HashMap();
            ArrayList v0 = new ArrayList();
            NetworkUtils.a(((List) v0));
            Iterator v2 = ((List) v0).iterator();
            while (v2.hasNext()) {
                Object v0_1 = v2.next();
                String v3 = ((NameValueImpl) v0_1).name;
                String v0_2 = ((NameValueImpl) v0_1).value;
                if (TextUtils.isEmpty(((CharSequence) v3))) {
                    continue;
                }

                if (TextUtils.isEmpty(((CharSequence) v0_2))) {
                    continue;
                }

                ((Map) v1).put(v3, v0_2);
            }

            return ((Map) v1);
        }
    }
}

